<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>后台管理面板</title>
  <!-- 告诉浏览器该页面是自适应布局 -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <include file="common/top" />
</head>
<body class="hold-transition skin-blue sidebar-mini">	
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
          <h1>{{$lists?'修改':'添加'}}栏目</h1>
        </section>
        <!--内容开始-->
        <section class="content">
            <div class="search">
            	<form class="form-inline" action="">
                 <input class="btn btn-flat btn-primary m_10_l_0" onclick="location.href='{{:url('index')}}'" type="button" value="显示全部">
                 <a class="btn btn-flat btn-success m_10 f_r" onclick="javascript :history.back(-1)"><i class="fa fa-undo m-r-10"></i>返 回</a>  
            	</form> 
            </div>
            <!--数据表开始-->
            <if condition="$lists">
            <form method="post" action="{{:url('editsave')}}">
                <input type="hidden" name="id" value="{{$lists.id}}"/>
            <else />
            <form method="post" action="{{:url('addsave')}}">
            </if>
            <!---->
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                	<div class="box box-body">
						<div class="nav-tabs-custom">
                        <ul class="nav nav-tabs">
                          <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="false">基础设置</a></li>
                          <li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">SEO管理</a></li>
                        </ul>
                        <div class="tab-content">
                          <div class="tab-pane active" id="tab_1">
                            <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">上级分类</label>
				                  <div class="col-sm-4 col-xs-8">
				                    <select name="pid" class="form-control">
				                        <option value="0">作为顶级分类</option>
                    					<volist name="cate" id="cate_list">
                                        <option <eq name="$pid" value="$cate_list.id">selected</eq> value='{{$cate_list.id}}'>{{$cate_list.name}}</option>
                                        </volist>
                                   </select>
                                  </div>
                                  <div class="col-sm-4 dd_ts"> 分类层级不能超过 4 级</div>
				                </div>
			                </div> 
                            <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">栏目名称</label>
				                  <div class="col-sm-4 col-xs-8">
				                     <input type="text" name="name" class="form-control" placeholder="请输入栏目名称" value="{{$lists.name}}">
				                  </div>
                                  <div class="col-sm-4 dd_ts">*</div>
				                </div>
			                </div>
                            <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">栏目目录</label>
				                  <div class="col-sm-4 col-xs-8">
				                     <input type="text" name="typedir" class="form-control" placeholder="请输入栏目目录" value="{{$lists.typedir}}">
				                  </div>
                                  <div class="col-sm-4 dd_ts"> 建议填写英文唯一目录，不可重复，不可有空格，用于URL美化，如：AboutUs，如不填写默认为栏目名称的拼音</div>
				                </div>
			                </div>
			                <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">内容模型</label>
				                  <div class="col-sm-4 col-xs-8">
				                    <select name="mcode" class="form-control">
                    					<option value="0">请选择内容模型</option>
                    			        <volist name="modellists" id="model">
                    						<option value="{{$model.mcode}}" <eq name="lists.mcode" value="$model.mcode">selected</eq> >{{$model.name}}</option>
                    					</volist>
                                    </select>
                                  </div>
				                </div>
			                </div> 
			                <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">列表页模板</label>
				                  <div class="col-sm-4 col-xs-8">
				                    <select name="listtpl" class="form-control">
                                    	<option value="0">请选择列表页模板</option>
                    			        <volist name="$tpls.list" id="tpl">
                    						<option value="{{$tpl}}" <eq name="lists.listtpl" value="$tpl">selected</eq> >{{$tpl}}</option>
                    					</volist>
                                  </select>
                                  
				                  </div>
				                </div>
			                </div> 
			                <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">内容页模板</label>
				                  <div class="col-sm-4 col-xs-8">
				                    <select name="contenttpl" class="form-control">
                                    	<option value="0">请选择内容页模板</option>
                    			        <volist name="$tpls.show" id="tpl">
                    						<option value="{{$tpl}}" <eq name="lists.contenttpl" value="$tpl">selected</eq> >{{$tpl}}</option>
                    					</volist>
                                  </select>
                                  
				                  </div>
				                </div>
			                </div> 
                            <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">默认页的名称</label>
				                  <div class="col-sm-4 col-xs-8">
				                     <input type="text" name="defaultname" class="form-control" placeholder="请输入默认页的名称" value="{{$lists.defaultname}}">
				                  </div>
				                </div>
			                </div>
                            <!---->
                             <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">栏目图片</label>
				                  <div class="col-sm-4 col-xs-8">
				                    <input type="text" name="image" class="form-control" placeholder="请点击按钮上传或手动输入地址" value="{{$lists.image}}">
				                  </div>
				                  <div class="col-sm-4 dd_ts">
				                  	<!--上传图片-->
                                    <!--用来存放item-->
                                    <div id="fileList_image" class="uploader-list">
                                    </div>
                                    <div id="filePicker_image"><i class="fa fa-upload m-r-10"></i>选择图片</div>
                                    <img class="image_preview" src="{{$lists.image?$lists.image:'/static/admin/images/nopic.png'}}" id="image_preview">
				                  	<!--上传图片-->
				                  </div>
				                </div>
			                </div>
                            <!---->
                             <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                  <div class="col-sm-5 col-xs-12">
                                  <label class="text-lable">栏目简介</label>
                                  <textarea class="form-control" name="summary" rows="3" placeholder="请输入栏目简介">{{$lists.summary}}</textarea>
                                  </div>
                                </div>
                            </div>
                            <!---->
                             <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">状态</label>
				                  <div class="col-sm-4 col-xs-8">
                                  <div class="dd_radio_lable_left">
                                  <if condition="$lists">
				                    <label class="dd_radio_lable">
                                      <input type="radio" name="status" value="1" class="dd_radio" <eq name="lists.status" value="1">checked</eq> ><span>显示</span>
                                    </label>
                                    <label class="dd_radio_lable">
                                      <input type="radio" name="status" value="0" class="dd_radio" <eq name="lists.status" value="0">checked</eq> ><span>隐藏</span>
                                    </label>
                                     <else />
                                     <label class="dd_radio_lable">
                                      <input type="radio" name="status" value="1" class="dd_radio" checked><span>显示</span>
                                    </label>
                                    <label class="dd_radio_lable">
                                      <input type="radio" name="status" value="0" class="dd_radio" ><span>隐藏</span>
                                    </label>
                                     </if>
                                     </div>
				                  </div>
                                  <div class="col-sm-4 dd_ts">仅对终级分类有效</div>
				                </div>
			                </div>
                            <!---->
                   <!--         <div class="row dd_input_group">-->
			                <!--	<div class="form-group">-->
				               <!--   <label class="col-sm-1 col-xs-4 control-label dd_input_l">分页条数</label>-->
				               <!--   <div class="col-sm-4 col-xs-8">-->
				               <!--      <input type="text" name="pagesize" class="form-control" placeholder="请输入分页条数" value="{$info.pagesize}">-->
				               <!--   </div>-->
                   <!--               <div class="col-sm-4 dd_ts">用于设置分页显示的数量，为空时默认值为系统设置的值</div>-->
				               <!-- </div>-->
			                <!--</div>-->
                            <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">外部链接</label>
				                  <div class="col-sm-4 col-xs-8">
				                     <input type="text" name="url" class="form-control" placeholder="请输入外部链接" value="{{$lists.url}}">
				                  </div>
                                  <div class="col-sm-4 dd_ts">如需跳转网站，请填写链接地址，为空则不跳转</div>
				                </div>
			                </div>
                            <!---->
                             <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">排序</label>
				                  <div class="col-sm-4 col-xs-8">
				                     <input type="text" name="sort" class="form-control" placeholder="请输入排序" value="{{$lists.sort?$lists.sort:'50'}}">
				                  </div>
                                  <div class="col-sm-4 dd_ts">排序为从小到大排序，默认为50,相同则按ID从小到大排序</div>
				                </div>
			                </div>
                            <!---->
                            <!--->
                          </div>
                          <!-- /.tab-pane -->
                          <div class="tab-pane" id="tab_2">
                           <!---->
                            <div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label dd_input_l">SEO标题</label>
				                  <div class="col-sm-4 col-xs-8">
				                     <input type="text" name="seo_title" class="form-control" placeholder="请输入SEO标题" value="{{$lists.seo_title}}">
				                  </div>
				                </div>
			                </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                  <div class="col-sm-5 col-xs-12">
                                  <label class="text-lable">SEO关键字</label>
                                  <textarea class="form-control" name="seo_keys" rows="3" placeholder="请输入SEO关键字">{{$lists.seo_keys}}</textarea>
                                  </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                  <div class="col-sm-5 col-xs-12">
                                  <label class="text-lable">SEO描述</label>
                                  <textarea class="form-control" name="seo_desc" rows="3" placeholder="请输入SEO描述">{{$lists.seo_desc}}</textarea>
                                  </div>
                                </div>
                            </div>
                            <!---->
                          </div>
                          <!-- /.tab-pane -->
                        </div>
                        
                        	<div class="row dd_input_group">
			                	<div class="form-group">
				                  <label class="col-sm-1 col-xs-4 control-label"></label>
				                  <div class="col-sm-4 col-xs-8">
				                    	<button type="submit" class="btn btn-flat btn-primary ">提 交</button> 
				                    	<button type="button" class="btn btn-flat btn-default" onclick="javascript :history.back(-1)">返 回</button>
				                  </div>
		
				                </div>
			                </div>
                        <!-- /.tab-content -->
                      </div>     
                 	</div>
                  <!-- /.box -->
                </div>
              </div>
              </form>
            <!--数据表结束-->
        </section>
        <!-- right col -->
      </div>
      <!-- /.row (main row) -->

    </section>
        <!--内容结束-->
    </div>
</div>
  <include file="common/bottom" />
<!--引入JS-->
<script type="text/javascript" src="/static/admin/webuploader-0.1.5/webuploader.js"></script>
  <include file="common/upload" />
<script type="text/javascript">
	webupload('fileList_image','filePicker_image','image_preview','image');
</script>

</body>
</html>    